home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
comm
/
news
/
slrn-src.lha
/
slrn
/
doc
/
slrnfuns.txt
< prev
next >
Wrap
Text File
|
1999-04-27
|
31KB
|
1,386 lines
article_as_string
SYNOPSIS
-
USAGE
String article_as_string ()
DESCRIPTION
This function will return the entire contents of the current
article as a string.
SEE ALSO
--------------------------------------------------------------
get_next_art_pgdn_action
SYNOPSIS
-
USAGE
Integer get_next_art_pgdn_action ()
DESCRIPTION
This function may be used to get information about what action slrn
will take when an attempt is made to go to the next page of the
current article, e.g., by pressing the space key. It returns one
of the following integers:
-1 Not in article mode
0 Next page of the article will be displayed
1 The next unread article will be displayed
2 The newsreader will go to the next newsgroup
--------------------------------------------------------------
is_article_visible
SYNOPSIS
-
USAGE
Integer is_article_visible ()
DESCRIPTION
This function returns information about whether or not the article
associated with the current header is visible in a window.
Specifically, it returns:
0 : if the article window is hidden
1 : if the article window is showing but the current header
does not refer to the article
3 : if the article window contains the current header article
SEE ALSO
is_article_window_zoomed, call
--------------------------------------------------------------
is_article_window_zoomed
SYNOPSIS
-
USAGE
Integer is_article_window_zoomed ()
DESCRIPTION
This function returns 1 if the article window is zoomed, or 0
otherwise.
SEE ALSO
is_article_visible, call
--------------------------------------------------------------
pipe_article
SYNOPSIS
-
USAGE
Void pipe_article (String cmd)
DESCRIPTION
This function may be used to pipe the current article to the command
given by the `cmd' argument.
SEE ALSO
read_mini
--------------------------------------------------------------
re_search_article
SYNOPSIS
-
USAGE
Integer re_search_article (String pat)
DESCRIPTION
This function searches forward in the article associated with the
currently selected header for a string matching the regular
expression given by the parameter `pat'. It returns 0 if no
matching line is found. Otherwise, it returns 1 and the matching
line will be left on the stack as a string.
SEE ALSO
search_article
--------------------------------------------------------------
save_current_article
SYNOPSIS
-
USAGE
Integer save_current_article (String filename)
DESCRIPTION
This function saves the currently selected article to a file
specified by `filename'. It returns 0 upon success or -1 upon
failure.
NOTES
This function always creates a new file.
SEE ALSO
--------------------------------------------------------------
search_article
SYNOPSIS
-
USAGE
Integre search_article (String str)
DESCRIPTION
This function searches forward in the article associated with the
currently selected header for the string given by the parameter
`str'. It returns 0 if no matching line is found. Otherwise, it
returns 1 and the matching line will be left on the stack as a
string.
SEE ALSO
re_search_article
--------------------------------------------------------------
set_article_window_size
SYNOPSIS
-
USAGE
Void set_article_window_size (Integer nrows)
DESCRIPTION
The `set_article_window_size' may be used to set the height of the
article window. The variable `SCREEN_HEIGHT' may be used to
facilitate this.
SEE ALSO
--------------------------------------------------------------
get_response
SYNOPSIS
-
USAGE
Interger get_response (String choices, String prompt)
DESCRIPTION
This function will prompt the user for a single character using the
prompt as specifed by the second parameter. The first parameter,
choices, specified the characters that will be accepted. Any
character in the prompt string that is preceeded by \001 will be
given the `response_char' color.
EXAMPLE
The following:
rsp = get_response ("yYnN", "Are you hungry? \001Yes, \001No");
will return one of the four characters `y', `Y', `n',
or `N' to the variable `rsp'.
SEE ALSO
get_yes_no_cancel, set_color, get_select_box_response
--------------------------------------------------------------
get_select_box_response
SYNOPSIS
-
USAGE
Integer get_select_box_response (title, item_1, ..., n_items)
DESCRIPTION
This function pops a selection box and queries the user for a
response. An integer is returned which indicates the user's choice.
EXAMPLE
variable rsp = get_select_box_response (
"Pick a number:",
"one", "two", "three", "four",
4);
message (sprintf ("You chose %d", rsp));
SEE ALSO
read_mini, message, get_yes_no_cancel, get_response
--------------------------------------------------------------
get_yes_no_cancel
SYNOPSIS
-
USAGE
Integer get_yes_no_cancel (str)
DESCRIPTION
This function displays `str' in the minibuffer after concatenating
`"? [Y]-es, N-o, C-ancel"' to it. It then awaits user input and
returns:
1 if yes
0 if no
-1 if cancel
NOTES
If a `%' character is to appear, it must be doubled.
SEE ALSO
get_select_box_response, getkey, read_mini, select_list_box
--------------------------------------------------------------
message_now
SYNOPSIS
Display a message immediately
USAGE
Void slrn_message_now (String_Type s)
DESCRIPTION
This function displays the string `s' to the message area
immediately.
SEE ALSO
message, vmessage, error
--------------------------------------------------------------
read_mini
SYNOPSIS
-
USAGE
String read_mini (String p, String dflt, String init)
DESCRIPTION
This function will prompt the user for a string value using prompt
`p'. The second parameter `dfl' is used to specify the
default value. If the final parameter is not the empty string
(`""'), it will be made available to the user for editing.
SEE ALSO
read_mini_no_echo, getkey, set_input_string, set_input_chars
--------------------------------------------------------------
read_mini_no_echo
SYNOPSIS
-
USAGE
String read_mini_no_echo (String p, String dflt, String init)
DESCRIPTION
This function performs the same purpose as `read_mini' except it
does not echo the entered text to the screen.
SEE ALSO
read_mini, getkey, set_input_string, set_input_chars
--------------------------------------------------------------
select_list_box
SYNOPSIS
-
USAGE
String_Type select_list_box (title, s_1, ... s_n, n, active_n)
String_Type title, s_1, ... s_n
Int_Type n, active_n
DESCRIPTION
This purpose of this function is to present a list of `n' strings,
specified by the `s_1', ... `s_n' parameters to the user and have
the user select one. The user interface for this operation is that
of a box of strings. The title of the box is specified by the
`title' parameter. The `active_n' parameter specifies which string
is to be the default selection. It returns the string selected by
the user.
SEE ALSO
get_select_box_response, get_response
--------------------------------------------------------------
set_input_chars
SYNOPSIS
-
USAGE
Void set_input_chars (String val)
DESCRIPTION
This function may be used to set the character that will be returned
by the next prompt for single character input in the minibuffer.
This is the type of input that `get_response' solicits.
EXAMPLE
set_input_chars ("y");
if ('y' == get_yes_no_cancel ("Really Quit"))
quit (0);
SEE ALSO
set_input_string, get_response, get_yes_no_cancel
--------------------------------------------------------------
set_input_string
SYNOPSIS
-
USAGE
Void set_input_string (String val)
DESCRIPTION
This function may be used to set the